File: rtiostream.h

    1   /*
    2    * Copyright 2007-2012 The MathWorks, Inc.
    3    *
    4    * File: rtiostream.h     
    5    *
    6    * Abstract:
    7    *  Function prototypes and defines for rtIOStream API.
    8    */
    9   
   10   #ifndef RTIOSTREAM_H
   11   #define RTIOSTREAM_H
   12   
   13   #include <stddef.h>
   14   
   15   #define RTIOSTREAM_ERROR (-1)
   16   #define RTIOSTREAM_NO_ERROR (0)
   17   
   18   /* Note: if the functions declared in this file should be compiled into a shared
   19    * library (e.g. a .dll file on Windows), you must ensure that the functions are
   20    * externally visible. The procedure to achieve this depends on the compiler and
   21    * linker you are using. For example, on Windows, you may need to provide an
   22    * exports definition .def file that lists all of the functions to be
   23    * exported; see ./rtiostream/rtiostream_pc.def for a suitable .def file.
   24    */
   25   
   26   #ifndef RTIOSTREAMAPI
   27   #define RTIOSTREAMAPI 
   28   #endif 
   29   
   30   RTIOSTREAMAPI int rtIOStreamOpen(
   31       int    argc,
   32       void * argv[]
   33   );
   34   
   35   RTIOSTREAMAPI int rtIOStreamSend(
   36       int          streamID,
   37       const void * src, 
   38       size_t       size,
   39       size_t     * sizeSent
   40       );
   41   
   42   RTIOSTREAMAPI int rtIOStreamRecv(
   43       int      streamID,
   44       void   * dst, 
   45       size_t   size,
   46       size_t * sizeRecvd
   47       );
   48   
   49   RTIOSTREAMAPI int rtIOStreamClose(
   50       int streamID
   51       );
   52   
   53   
   54   #endif /* #ifndef RTIOSTREAM_H */
   55